//
//  GNValidator.swift
//  GNAppKit
//
//  Created by Wenkai Fan 范文凯 on 2019/1/8.
//  Copyright © 2019年 Wenkai Fan 范文凯. All rights reserved.
//

import Foundation

/// Base class for Validation
open class GNValidator<T> {
    open var value: T
    
    open var isEmpty: Bool {
        return true
    }
    
    open var isValid: Bool {
        return true
    }
    
    public init(value: T) {
        self.value = value
    }
    
    public func validate(expression closure: (T) -> Bool) -> Bool {
        return closure(value)
    }
    
}



















